﻿using System;
using System.Windows;
using Matchingo.Common.Types.Enumerations;

namespace Matchingo.Common.Types.Interfaces
{
    public interface IMenuFlowProvider
    {
        /// <summary>
        /// The menu item currently being displayed
        /// </summary>
        MenuModuleNames.ModuleNames CurrentMenuItem { get; }

        /// <summary>
        /// Must be called before making use of other methods/properties/etc of this object
        /// </summary>
        void Initialize();

        /// <summary>
        /// Register a menu item with this IMenuFlowProvider
        /// </summary>
        /// <param name="menuItem">The menu item to register with this menu provider</param>
        /// <param name="key">The key which specifies what menu item this is</param>
        /// <param name="e">The UI element of this menu item</param>
        void RegisterUIModule(IMenuItem menuItem, MenuModuleNames.ModuleNames key, UIElement e);

        /// <summary>
        /// Opens a specified menu
        /// </summary>
        /// <param name="menuSelection">The key of the menu item which is being requested to be shown</param>
        void OpenMenu(MenuModuleNames.ModuleNames menuSelection);

        /// <summary>
        /// Close the menu entirely (if any part of it is being shown)
        /// </summary>
		void CloseMenu();

        /// <summary>
        /// Fires when this menu provider has finished initializing
        /// </summary>
        event EventHandler FinishedInitializing;
    }
}
